package com.ocom.common.request.payhandle;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.ArrayList;
import java.util.List;


@Data
public class ShoppingCartRequest {

    @Min(value = 1,message = "type 最小为1")
    @NotNull(message = "type 不能为空")
    Integer type ;

    String openId;

    @NotBlank(message = "tradeNo 不能为空")
    String tradeNo;
    @NotNull(message = "pId 不能为空")
    @JsonProperty("pId")
    Long pId;
    @NotNull(message = "companyId 不能为空")
    Long companyId;
    Integer merchId = 0;

    Integer consType = 1;
    Integer consState = 5;
    String gzhAppid = "gzh";

    List<ShoppingCartMealListVo> list =new ArrayList<>();
    List<ShoppingCartMealListVo> shoppingCart =new ArrayList<>();

    @Data
    public static class ShoppingCartMealListVo {
        @NotBlank(message = "mealDate 不能为空")
        String mealDate;
        @NotNull(message = "mealNo 不能为空")
        Integer mealNo;
        @NotNull(message = "pointId 不能为空")
        Integer pointId;
    }
}
